Results 1 to 5 of 5

Thread: floating triggers?

  1. #1

    Default floating triggers?

    ok can you have a trigger set up like the teleporter spot with more than locations? like this

    switch ((randomint 2)+1)
    {

    case 2 :
    local.player tele ( -1156 -712 592 ) //exit top r pill box roof
    break

    case 1 :
    local.player tele ( 1625 -330 592 ) //exit top l/pillbox roof
    break

    }

    only make the triggers random? so the exit spot be the same but the trigger moves to different places? in other words can you use that switch thing to switch any kind of thing you want?

  2. #2

    Default

    Yeah, why not.

    Code:
    teleport:
        
        local.marker = spawn script_model model "emitters/welding_spark.tik" origin ( 1346.818 31.125 311.791 )   // starting point
        local.trig = spawn trigger_multiple origin (local.marker.origin)
        local.trig setsize ( -20 -20 -10) ( 20 20 10)
    
      while(1)
      {
        local.trig waittill trigger
        local.player = parm.other
        
        // Randomize destination:
        switch ((randomint 2)+1)
        {
    
           case 2 :
           local.player tele ( -1156 -712 592 ) //exit top r pill box roof
                   break
    
           case 1 :
               local.player tele ( 1625 -330 592 ) //exit top l/pillbox roof
               break
        }
    
        local.trig notTriggerable
        wait 4
        local.trig triggerable
      }
    end
    Include a default case in-case something goes terribly wrong.
    Browse MOHAA Servers Post GameSpy Era

    VISIT MOHREBORN.COM FOR LATEST INFORMATION



    Medal of Honor: Game Server Browser Fixer - Patches your MOHAA, MOHSH, and MOHBT game binaries to allow you to retrieve a list of game servers within the multi-player menu in-game even after GameSpy ceases operation!

    Medal of Honor: Query Launcher - Find, browse, organize, join, get your ping, and get more information regarding all Medal of Honor (AA, SH, & BT) servers from your PC at any time!
    Medal of Honor: Web Server Master List - Find and browse all Medal of Honor servers online using your browser!
    Add your Medal of Honor Server to the Master List
    YouTube Video for Medal of Honor: Query Launcher and MOHAASERVERS.TK!



    MOHAA Mods and Utilities
    OwN-3m-All's Mods
    Make Me Stock - A program that allows you to easily move-in and move-out non-stock mods and other files at the click of a button. Automates adding / removing mods without having to copy / move files manually.



    Quality Game Servers

    Rent dedicated Dallas Texas, Kansas City, Las Vegas Nevada, Chicago, Pennsylvania, and Sofia Bulgaria MOHAA and other game servers from We Be HostiN starting at $10 a month.


  3. #3
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,259

    Default

    This is the teleport script i made when i wanted multiple destinations and/or start points, can go either way
    Code:
    teleport:
    
    /// Put start coords below, if you only want 1 , only use 1
    local.startarray = makeArray
    
    ( -1700.05 3069.68 200 )
    ( -1500.05 3069.68 200 )
    ( -2000.05 3069.68 200 )
    
    endArray
    
    // same with destinations, if you want multiple random ones, put multiple in there.
    local.destinations = makeArray
    
    ( -724 4668 240  )
    ( 566 4537 240 )
    ( 587 3335 240 )
    ( 456 3779 324 )
    
    endArray
    
    while(1)
    {
    /// pick random destination and start
    local.dest = local.destinations[((randomint local.destinations.size) + 1)][1]
    local.start = local.startarray[((randomint local.startarray.size) + 1)][1]
    
    //double checks for no NIL values
    if(local.start == NIL)
    local.start = local.startarray[1][1]
    
    if(local.dest == NIL)
    local.dest = local.destinations[1][1]
    //////////////////////
    /// Spawn new teleport ////
    local.trig = spawn trigger_use origin (local.start)
    local.port = spawn script_model  model "emitters/welding_spark.tik" origin (local.start)
    local.trig setsize ( -30 -30 0 ) ( 30 30 10 )
    
    local.trig waittill trigger
    
    local.player = parm.other
    local.player tele local.dest
    
    local.trig remove
    local.port remove
    
    wait 3
    }
            
    end
    So if you wanted just one destination , only have one set of coords, and same with start point.

    I chose to use arrays , rather then a switch clause, less to write to add more locations lol

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  4. #4
    Senior Member
    Join Date
    Feb 2012
    Location
    Egypt
    Posts
    174

    Default

    Code:
    tele:
    local.portlight = spawn script_model
    local.portlight model "emitters/welding_spark.tik" 
    local.portlight.origin = ( )
    local.portlight.scale = 3
    local.portlight notsolid
    
    local.trig = spawn trigger_multiple
    local.trig.origin = (  ) //
    local.trig setsize ( -30 -30 -10 ) ( 30 30 10 ) 
    local.trig setthread random
    end
    
    random:
    self waittill trigger
    local.player=parm.other
    
    switch ((randomint 3)+1)
    {
    case 3:                                     
    thread tel1 local.player
    break
    case 2:                                     
    thread tel2 local.player
    break
    case 1:                                     
    thread tel3 local.player
    break
    }
    end
    tel1:
    self waittill trigger
    local.player=parm.other
    if (local.player.istel1==1)
    end
    local.player.istel1=1
    local.player tele (   ) 
    local.player.istel1=0
    end
    
    tel2:
    self waittill trigger
    local.player=parm.other
    if (local.player.istel2==1)
    end
    local.player.istel2=1
    local.player tele (  ) 
    local.player.istel2=0
    end
    
    tel3:
    self waittill trigger
    local.player=parm.other
    if (local.player.istel3==1)
    end
    local.player.istel3=1
    local.player tele (   ) 
    local.player.istel3=0
    end

  5. #5

    Default

    ok thanks guys this will make my day once I get it working.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •